<#include "macro/layout.ftl" />
<@layout title="首页">

    <div class="row">
        <div class="alert alert-danger" role="alert">
            <a href="#" class="alert-link"><i class="fa fa-bell-o"></i>这里是首页通知区</a>
        </div>
    </div>
    <div class="row" >
        <div class="col-md-9">
            <div class="row">
                <div class="col-md-12">
                    <div class="page-header">
                        <h4>推荐文章</h4>
                    </div>
                    <#list stickedArticleList as article>
                    <div class="col-md-6"><a class="text-primary" href="${ctxPath}/article/${article.id}.html" target="_blank">${article.title!}</a></div>
                    </#list>
                </div>
            </div>
            <div class="row">
                <div class="col-md-7">
                    <div class="page-header">
                        <h4>最新发布</h4>
                    </div>
                    <ul class="list-group">
                        <#list recentArticleList as article>
                        <li class="list-group-item"><a href="${ctxPath}/article/${article.id}.html" target="_blank">${article.title!}</a></li>
                        </#list>
                    </ul>
                </div>
                <div class="col-md-5">
                    <div class="page-header">
                        <h4>标准文档<small><a href="${ctxPath}/domain/official-document">更多...</a></small>
                            <div class="pull-right">
                                <#list officalDocTagList as tag>
                                <small><a href="${ctxPath}/tag/${tag.code!}">${tag.name!}</a></small>
                                </#list>
                            </div>
                        </h4>
                    </div>
                    <ul class="list-group">
                        <#list officalDocArticleList as article>
                        <li class="list-group-item"><a href="#"><i class="fa fa-file-pdf-o"></i>${article.title!}</a></li>
                        </#list>
                    </ul>
                </div>
            </div>
            <#-- 第二行 -->
            <div class="row">
                <div class="col-md-6">
                    <div class="page-header">
                        <h4>常见问题
                            <div class="pull-right">
                                <#list faqTagList as tag>
                                    <small><a href="${ctxPath}/tag/${tag.code!}">${tag.name!}</a></small>
                                </#list>
                            </div>
                        </h4>
                    </div>
                    <ul class="list-group">
                        <#list faqArticleList as article>
                            <li class="list-group-item"><a href="${ctxPath}/article/${article.id}.html" target="_blank">${article.title!}</a></li>
                        </#list>
                    </ul>
                </div>
                <div class="col-md-6">
                    <div class="page-header">
                        <h4>问答交流
                            <div class="pull-right">
                                <#list snsTagList as tag>
                                    <small><a href="${ctxPath}/tag/${tag.code!}">${tag.name!}</a></small>
                                </#list>
                            </div>
                        </h4>
                    </div>
                    <ul class="list-group">
                        <#list snsArticleList as article>
                            <li class="list-group-item"><a href="${ctxPath}/article/${article.id}.html" target="_blank">${article.title!}</a></li>
                        </#list>
                    </ul>
                </div>
            </div>
            <#-- 第三行 -->
            <div class="row">
                <div class="col-md-7">
                    <div class="page-header">
                        <h4>业务方案
                            <div class="pull-right">
                                <#list bzsoTagList as tag>
                                    <small><a href="${ctxPath}/tag/${tag.code!}">${tag.name!}</a></small>
                                </#list>
                            </div>
                        </h4>
                    </div>
                    <ul class="list-group">
                        <#list bzsoArticleList as article>
                            <li class="list-group-item"><a href="${ctxPath}/article/${article.id}.html" target="_blank">${article.title!}</a></li>
                        </#list>
                    </ul>
                </div>
                <div class="col-md-5">
                    <div class="page-header">
                        <h4>标签</h4>
                    </div>
                    <p>
                        <#list allTagList as tag>
                            <span class="label label-default"><a href="${ctxPath}/tag/${tag.code!}">${tag.name}</a><span class="badge">${tag.referCount}</span></span>
                        </#list>
                    </p>
                </div>
            </div>
            <#-- 第四行 -->
            <div class="col-md-6">
                <div class="page-header">
                    <h4>JAVA
                        <div class="pull-right">
                            <#list javaTagList as tag>
                                <small><a href="${ctxPath}/tag/${tag.code!}">${tag.name!}</a></small>
                            </#list>
                        </div>
                    </h4>
                </div>
                <ul class="list-group">
                    <#list javaArticleList as article>
                        <li class="list-group-item"><a href="${ctxPath}/article/${article.id}.html" target="_blank">${article.title!}</a></li>
                    </#list>
                </ul>
            </div>
            <div class="col-md-6">
                <div class="page-header">
                    <h4>数据库
                        <div class="pull-right">
                            <#list dbTagList as tag>
                                <small><a href="${ctxPath}/tag/${tag.code!}">${tag.name!}</a></small>
                            </#list>
                        </div>
                    </h4>
                </div>
                <ul class="list-group">
                    <#list dbArticleList as article>
                        <li class="list-group-item"><a href="${ctxPath}/article/${article.id}.html" target="_blank">${article.title!}</a></li>
                    </#list>
                </ul>
            </div>

        </div>
        <div class="col-md-3">
            <form action="${ctxPath}/tweet/send" method="post" id="tweet-form">
                <div class="input-group input-group-lg">
                    <textarea type="text" style="height:80px;" class="form-control" id="content" name="content" placeholder="你想弹什么"></textarea>
                    <a class="input-group-addon" role="button" onclick="javascript:$('#tweet-form').submit();">发射</a>
                </div>
            </form>
            <div class="list-group">
                <#list tweetList as tweet>
                <a href="#" class="list-group-item">
                    <p class="list-group-item-text">${tweet.content!}</p>
                </a>
                </#list>
                <#--<a href="#" class="list-group-item">-->
                    <#--<p class="list-group-item-text">我是个脸盲，我根本不知道她漂亮不漂亮</p>-->
                <#--</a>-->
                <#--<a href="#" class="list-group-item">-->
                    <#--<p class="list-group-item-text">我最后悔的就是创建了阿里巴巴</p>-->
                <#--</a>-->
                <#--<a href="#" class="list-group-item">-->
                    <#--<p class="list-group-item-text">我出生在一个普通家庭</p>-->
                <#--</a>-->
                <#--<a href="#" class="list-group-item">-->
                    <#--<p class="list-group-item-text">我有一个梦想</p>-->
                <#--</a>-->
            </div>

        </div>
    </div>

</@layout>